home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Linux Cubed Series 8: LINUX Games
/
Linux Cubed Series 8 - LINUX Games.iso
/
games
/
x11
/
strategy
/
xnetbris.00
/
xnetbris
/
brisk.h
next >
Wrap
C/C++ Source or Header
|
1995-07-23
|
2KB
|
78 lines
/* general defines for net-brisk
*
* Brendan Bartlett, 1995
*/
#define VERSION 1.00
#define MAX_PLAYERS 4
#define CHAOS 10
#define TEAM 11
/* This is the only structure passed between the server-client */
#define MESSAGE_TYPE 100
#define MOVE_TYPE 101
#define DEAL_TYPE 103
#define SCORE_UPDATE 104
#define END_GAME 105 /* shares the SCORE_UPDATE structure */
#define INFORM_TYPE 200 /* had no data structure */
#define MOVE_EXPECTED 201 /* had no data structure */
#define ILLEGAL_MOVE 202 /* found in packet->type */
#define OK 203 /* " " */
#define LAST_HAND 204
struct card
{
unsigned int suit;
unsigned int weight;
};
struct packet
{
int type; /* one of the above type */
union
{
struct
{
char string[80];
} message;
struct
{
unsigned int tablepos;
unsigned int player;
struct card play_card;
} move;
struct
{
unsigned char scores[4];
unsigned int lastwin; /* player # of the winner of the last hand */
} score;
struct
{
unsigned int rec_place; /* the "recommened" place where the client should put the card */
struct card deal_card;
} deal;
struct
{
unsigned int cardpos;
} ok;
struct /* sent when the game begins */
{
unsigned int numplayers;
unsigned int yournumber; /* which player this client is */
unsigned int play_type;
} inform;
} data;
};